package io.kiki.sba.registry.common.model.slot.filter;

import io.kiki.sba.registry.common.model.PublishSource;
import io.kiki.sba.registry.util.StringUtil;
import lombok.Getter;
import lombok.NonNull;


@Getter
public class SyncAcceptorRequest {

    private final String dataInfoId;

    private final PublishSource source;

    private SyncAcceptorRequest(String dataInfoId, PublishSource source) {
        this.dataInfoId = dataInfoId;
        this.source = source;
    }

    public static SyncAcceptorRequest buildRequest(String dataInfoId) {
        StringUtil.checkNotBlank(dataInfoId, "dataInfoId");
        return new SyncAcceptorRequest(dataInfoId, null);
    }

    public static SyncAcceptorRequest buildRequest(@NonNull String dataInfoId, @NonNull PublishSource publishSource) {

        return new SyncAcceptorRequest(dataInfoId, publishSource);
    }


}
